home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / aie9003.zip / NET.ARI (.txt) < prev    next >
Microsoft Windows Help File Content  |  1989-12-12  |  4KB  |  106 lines

  1. :- module net.
  2. :- public main / 0,
  3.           restart / 0.
  4. :- extrn main_hlpr / 0.
  5. 1 1 : 0
  6. 1 0 : 1
  7. 0 1 : 1
  8. 0 0 : 0
  9. formula : A or B
  10. Formulas attachted to nodes :
  11.       Input to node = input from node formula
  12.       Input from formula =
  13.           if formula is a node output then that output
  14.           else if formula = not formula1 then
  15. Activation of an NOT node
  16.                Result := ( 1 - INPUT )
  17. Activation of an OR node
  18.                begin
  19.                Result := 0;
  20.                for i ranging over all inputs to this node do
  21.                      Result := Result +
  22.                                ( 1 - Result ) * OUTPUT(i) * EDGE_FROM_i
  23.                end.
  24. Activation of an AND node
  25.                begin
  26.                Result := 1;
  27.                for i ranging over all inputs to this node do
  28.                      Result := Result *  OUTPUT(i) * EDGE_FROM_i
  29.                end.
  30. ARCHITECTURE OF NETWORK
  31. 1.  Given input nodes and their NOTs
  32. 2.  1st hidden layer : some number of AND nodes
  33. 3:  output layer : a problem-specific number of OR nodes
  34. LEARNING ALGORITHM
  35. Starting at the output and working toward the input, do
  36.       repeat,
  37.          Compute desired change of a neuron.
  38.          Compute desired changes of edges leading to it.
  39.          Move 1 layer toward input
  40. Desired change of a neuron :
  41.      Output Neuron :       ( DESIRED - ACTUAL )
  42.      Hidden neuron:
  43.         Let wij be an edge to neuron j in the next layer
  44.         SUM  wij * CHANGE(J)
  45.         edges to next layer
  46. Desired change of an edge :
  47.         Let  wij be an edge from neuron i to neuron j in the
  48.                 next layer.
  49.         CHANGE( wij ) = ACTIVATION( i ) * change( j )
  50. NEW EDGE WEIGHT GIVEN CHANGE
  51.         if change > 0 then
  52.             new := current + ( 1 - current ) * change
  53.         if change < 0 then
  54.             new := current + current * change
  55. INITIALIZATION
  56. Edges based on intuition
  57. When you don't know, make it a 1.
  58. Hidden layer generation
  59. Given : list of input neurons
  60.       I1,    I2,    I3,    I4,
  61.     Hidden layer 1 :  attached formulas on edges
  62. E1_1        I1  &  I2  &  I3  &  I4
  63. E1_2        I1  &  I2  &  I3  & -I4
  64. E1_3        I1  &  I2  & -I3  &  I4
  65. E1_4        I1  &  I2  & -I3  & -I4
  66. E1_5        I1  & -I2  &  I3  &  I4
  67. E1_6        I1  & -I2  &  I3  & -I4
  68. E1_7        I1  & -I2  & -I3  &  I4
  69. E1_8        I1  & -I2  & -I3  & -I4
  70. E1_9       -I1  &  I2  &  I3  &  I4
  71. E1_10      -I1  &  I2  &  I3  & -I4
  72. E1_11      -I1  &  I2  & -I3  &  I4
  73. E1_12      -I1  &  I2  & -I3  & -I4
  74. E1_13      -I1  & -I2  &  I3  &  I4
  75. E1_14      -I1  & -I2  &  I3  & -I4
  76. E1_15      -I1  & -I2  & -I3  &  I4
  77. E1_16      -I1  & -I2  & -I3  & -I4
  78.     Hidden layer 2 :
  79. neuron(   LAYER , NUMBER, FORMULA ).
  80.        LAYER = input, not( NUMBER), and, or
  81.        OUTPUT_LAYER,
  82.        INPUT_NEURON,
  83.        OUTPUT_NEURON,
  84.        TIME,
  85.        ACTIVATION).
  86. input(  KEY, NEURON_NUMBER, ACTIVATION).
  87. output(  KEY, NEURON_NUMBER, ACTIVATION).
  88. state( neuron,
  89.        LAYER,
  90.        NUMBER,
  91.        TIME,
  92.        ACTIVATION).
  93. state( edge  ,
  94.        OUTPUT_LAYER,
  95.        INPUT_NEURON,
  96.        OUTPUT_NEURON,
  97.        TIME,
  98.        ACTIVATION).
  99. input(  KEY, NEURON_NUMBER, ACTIVATION).
  100. output(  KEY, NEURON_NUMBER, ACTIVATION).
  101. %%%%%%%%%%%%%%% main program %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  102. main :-
  103.    main_hlpr.
  104. restart :- halt.
  105. %%%%%%%%%%%%%%%%%% eof %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
  106.